<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>医生端登录</title>
		<style>
			body { font-family: Arial, sans-serif; }
			.login-form { max-width: 400px; margin: 50px auto; padding: 20px; border: 20px solid #1a73e8; border-radius: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
			.input-group { margin-bottom: 15px; }
			label { display: block; margin-bottom: 5px; }
			input { width: 100%; padding: 8px; box-sizing: border-box; }
			button { background: #4CAF50; color: white; padding: 10px; border: none; width: 100%; cursor: pointer; }
			.error { color: red; font-size: 12px; }
			.checkbox-group { display: flex; align-items: center; }
			.checkbox-group input { width: auto; margin-right: 10px; }
		</style>
	</head>
	<body>
		<div class="login-form">
			<h2 style="background: #e6f2ff; padding: 10px; border-radius: 5px;">账号密码登录</h2>
			<form id="loginForm">
				<div class="input-group">
					<label for="username">工号/手机号/邮箱</label>
					<input type="text" id="username" required>
				</div>
				<div class="input-group">
					<label for="password">密码</label>
					<input type="password" id="password" required>
					<div id="passwordError" class="error"></div>
				</div>
				<div class="input-group checkbox-group">
					<input type="checkbox" id="remember">
					<label for="remember">记住密码</label>
				</div>
				<button type="submit">登录</button>
				<p style="text-align: center; margin-top: 15px;"><a href="注册.html" style="color: #2196F3;">还没有账号？立即注册</a></p>
			</form>
		</div>
		<script>
			document.getElementById('loginForm').addEventListener('submit', function(e) {
				e.preventDefault();
				const password = document.getElementById('password').value;
				const errorElement = document.getElementById('passwordError');
				
				// 密码强度验证
				if(password.length < 8) {
					errorElement.textContent = '密码长度必须至少8位';
					return;
				}
				if(!/[a-zA-Z]/.test(password)) {
					errorElement.textContent = '密码必须包含字母';
					return;
				}
				if(!/\d/.test(password)) {
					errorElement.textContent = '密码必须包含数字';
					return;
				}
				if(!/[^a-zA-Z0-9]/.test(password)) {
					errorElement.textContent = '密码必须包含特殊字符';
					return;
				}
				
				// 验证通过，可以提交
				errorElement.textContent = '';
				// 这里添加实际登录逻辑
				console.log('登录信息验证通过');
				// 跳转到首页
				window.location.href = '首页.html';
			});
		</script>
	</body>
</html>